let mongoose = require('mongoose')
let Schema = mongoose.Schema
let user = new mongoose.Schema({
    userName: String,
    password: String,
    nikeName: String,
    groupId: [{ type: Schema.Types.ObjectId, ref: 'group' }]  // 关联groups表
})
module.exports = mongoose.model('User', user , 'users')